﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using IHISCETeim.BLL;
using IHISCETeim.Library;
using IHISCETeim.Model;
using System.Data;

namespace IHISCETeim.Web.MachineSys.UserModel.ExportExecl
{
    public partial class ExportUClaimDemageTongJiReport : PageBase
    {
        protected override Permission[] PowerKey
        {
            get
            {
                return new Permission[] { Permission.导出, Permission.查看 };
            }
        }
        protected override string DWZRef
        {
            get
            {
                return "UClaimDemageTongJiReport";
            }
        }
        #region 属性 (查询条件)

       

        protected string fromdate
        {
            get
            {
                return GetRequestValue<string>("fromdate", "");

            }
        }
        protected string todate
        {
            get
            {
                return GetRequestValue<string>("todate", "");

            }
        }

        protected int Quarter
        {
            get
            {
                return GetRequestValue<int>("Quarter", 1);
            }
        }
        protected int Year
        {
            get
            {
                return GetRequestValue<int>("Year", DateTime.Now.Year);
            }
        }
        #endregion

        protected void Page_Load(object sender, EventArgs e)
        {
            DataBind();
        }
        protected DataTable SUMDT = null;
        protected void DataBind()
        {
            DataTableCollection DTC = UClaimDemageController.GetTongJiReport(fromdate, todate);
          
            SUMDT = DTC[1];
            rpMenu.DataSource = DTC[0];
            rpMenu.DataBind();
            base.ExportToExecl("索赔件来往帐汇总表", rpMenu);
        }        
    }
}